<?php
/**
 * setup.php is the main file and spearheads MoltenBlob
 * This file must be required from the configuration file and will handle all loading of
 * objects and variables
 */

require_once('config.php');

/**
 * Autoload required classes as needed. We only include what we need, save time, save memory
 * @link http://www.php.net/autoload __autoload()
 * @todo - consider the implications first ?
 */
/*
function __autoload($class) {
	$loadme = MBPATH . $class . '.php';
	if (file_exists($loadme)) {
		require_once($loadme);
	}
}
*/

// Requiring every part of MoltenBlob
require_once(MBPATH.'MoltenBlobDB.php');
require_once(MBPATH.'MoltenBlobUser.php');
require_once(MBPATH.'MoltenBlobSite.php');
require_once(MBPATH.'MoltenBlobHTML.php');


// Our globally usable MB Objects
global $DB, $USER, $SITE, $HTML;

$DB = new MoltenBlobDB($config['user'], $config['pass'], $config['hostname'], $config['dbname']);
$USER = new MoltenBlobUser($DB);
$SITE = new MoltenBlobSite();
$HTML = new MoltenBlobHTML();


?>
